home *** CD-ROM | disk | FTP | other *** search
/ Komputer for Alle 2003 Ekstra 100 Spil / K-CD_2003_Ekstra_100_Spil.iso / Action / GLtron / GLtron-0.62-setup.exe / {app} / scripts / video.lua < prev   
Text File  |  2002-12-21  |  839b  |  37 lines

  1. -- very similiar to setupSoundTracks() in audio.lua
  2.  
  3. function setupArtpacks()
  4.    local i,name
  5.    for i,name in artpacks do
  6.       if name == settings.current_artpack then
  7.      current_artpack_index = i
  8.      return
  9.       end
  10.    end
  11.    settings.current_artpack = artpacks[1]
  12.    current_artpack_index = 1
  13. end
  14.  
  15. function nextArtpack()
  16.    if current_artpack_index < getn(artpacks) then
  17.       current_artpack_index = current_artpack_index + 1
  18.    else
  19.       current_artpack_index = 1
  20.    end
  21.    settings.current_artpack = artpacks[ current_artpack_index ]
  22.    c_reloadArtpack()
  23. end
  24.  
  25. function previousArtpack()
  26.    if current_artpack_index > 1 then
  27.       current_artpack_index = current_artpack_index - 1
  28.    else
  29.       current_artpack_index = getn(artpacks) 
  30.    end
  31.    settings.current_artpack = artpacks[ current_artpack_index ]
  32.    c_reloadArtpack()
  33. end
  34.  
  35.  
  36.  
  37.